package com.rabbitmq.ChattingRoom.util.common.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 聊天室实体类
 */
@Data
@Accessors(chain = true)
public class RoomRESP {
    /**
     * 唯一id
     */
    @ApiModelProperty(value = "唯一id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 聊天室名称
     */
    @ApiModelProperty(value = "聊天室名称")
    private String roomName;
    /**
     * 聊天室备注
     */
    @ApiModelProperty(value = "聊天室备注")
    private String roomRemarks;
    /**
     * 聊天室最大人数
     */
    @ApiModelProperty(value = "聊天室最大人数")
    private Integer roomMax;
    /**
     * 聊天室状态
     */
    @ApiModelProperty(value = "聊天室状态")
    private Integer roomStatus;
    /**
     * 聊天室创建时间
     */
    @ApiModelProperty(value = "聊天室创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date roomCreate;
    /**
     * 聊天室创建人
     */
    @ApiModelProperty(value = "聊天室创建人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long roomCreater;

    /**
     * 当前聊天室的未读消息，默认为 0
     */
    @ApiModelProperty(value = "聊天室的未读消息")
    private Integer unreaMessage = 0;
}
